package sen.myReport;

import java.util.ArrayList;

public class ExcelRow extends ArrayList {

	public void addFormula(String s){
		add(new ExcelFormula(s));
	}
	@Override
	public Object set(int index, Object element) {
		int size = size();
		if(index >= size) {
			for (int i = 0; i <= (index-size); i++) {
				add(Constant.EXCELDATA_EMPTY_FILL);
			}
		}
		return super.set(index, element);
	}
	
	public Object setFormula(int index, String s) {
		return set(index, new ExcelFormula(s));
	}
}